Preparing SAP Fiori Apps for Offline Use

SAP has enabled some SAP Fiori apps to run offline, when prepackaged as hybrid apps hosted inside a native container for iOS or Android. The apps are presented as tiles within a local launchpad.

Use

SAP Fiori apps are normally used in online mode, in which client requests are sent over a network to the back end where the business data resides. Some SAP Fiori apps are enabled to run offline when prepackaged as hybrid apps hosted inside a native container for iOS or Android. The apps are presented as tiles within a local launchpad.

Offline-enabled apps access a local offline store containing business data that periodically synchronizes with the back end when the network connection is restored. Registration with SAP Mobile Platform Server or SAP Cloud Platform Mobile Services is required to initialize the creation of the offline store, and to provide the offline OData service that moves data between the back end and the client offline store.

For the apps that support offline mode and can be configured to do so as given here, see the documentation for your SAP Fiori app at http://help.sap.com/fiori_bs2013.

Packager

The CLI packager for SAP Fiori apps is a Node.js application that is delivered with the SAP Mobile Platform SDK for hybrid apps. You can use it to download existing SAP Fiori apps from the front-end server and package them into a Cordova container for iOS or Android. The packager uses the SAP Cloud Platform Mobile Services cloud build service API to build the application binary files for iOS and Android, which can be deployed to users through SAP Mobile Place. Alternatively, developers with Cordova knowledge can create and build their own local Cordova project using the packager output.

Note This topic gives an overview of packaging for offline use, and provides configuration information that is specific to the offline-enabled SAP Fiori apps. To package apps for offline use, you have to additionally consult the latest version of the documentation for Packaging SAP Fiori Apps at http://help.sap.com/smp3014sdk Start of the navigation path Mobilizing SAP Fiori Next navigation step Packaging SAP Fiori Apps Next navigation step CLI Packager for SAP Fiori Apps End of the navigation path.
Prerequisites

For a complete list of requirements and prerequisites, see the packager documentation.

  • SAP Mobile Platform SDK 3.0 SP 9 PL 4 or higher is installed. SAP recommends to use the latest version of SAP Mobile Platform SDK.

  • You have a current SAP Mobile Secure account.

  • Registration with SAP Mobile Platform is required for offline-enabled apps. SAP recommends to use it to manage all of your apps.

    You can use SAP Mobile Platform Server SP08 PL01 or higher, or SAP Cloud Platform Mobile Services. The hybrid application must be defined in the admin cockpit before the app is launched on the client device.

Process
  1. Implement the offline-enabled SAP Fiori apps on the front-end server in the usual way.

  2. In the appConfig.js configuration file, do the following:

    1. Define the package properties. Provide the following information:

      Property

      Value

      appId

      Application identifier for SAP Mobile Platform registration: must be defind when fioriURLIsSMP is true.

      Example: com.acme.fiori.app

      Caution The hybrid application must be defined in the SAP Mobile Platform Server/HCPms admin cockpit before the app is launched on the client device.

      appName

      Defines the app name displayed on the device.

      Example: CRM

      appVersion

      Version identifier

      bundleID

      Globally unique application identifier. Select the bundle ID carefully to ensure that different applications do not overwrite each other, and to ensure that an updated application will correctly replace an existing application. It is strongly recommended to use dot notation. Use reverse domain name service (reverse DNS) notation.

      Example: com.acme.crm.app

      Note For iOS app signing to work correctly, the bundle ID you use in appConfig .js must match the app ID/bundle ID of the iOS provisioning profile (created in the Apple portal or Xcode) that created the corresponding iOS signing profile in SAP Mobile Secure.

      iOSSigningID androidSigningID

      SAP Cloud Platform Mobile Service signing profile IDs used to sign the application binary for iOS and Android.

      fioriURL

      Runtime endpoint for the application.

      As you set fioriURLIsSMP:true, enter the URL of the SAP Mobile Platform server.

      The format is <protocol>://<host>:<port>.

      fioriURLIsSMP

      Set to

      true. The device registers with SAP Mobile Platform using given appID.

      prepackaged

      Set to

      true.

      offline

      Set to

      true to create offline OData stores.

      singleApp

      Not currently supported. Do not change this property.

    2. In the applications property array, provide the app-specific properties.

      For more information, see the documentation for your SAP Fiori app at http://help.sap.com/fiori_bs2013.

  3. Using the packager, you start assembling the data, using the downloadfromfes command.

    For each package, the packager creates a set of folders and files in the target directory.

    For more information, see the CLI Packager documentation under http://help.sap.com/smp3014sdkStart of the navigation path Mobilizing SAP Fiori Next navigation step Packaging SAP Fiori Apps Next navigation step CLI Packager for SAP Fiori Apps Next navigation step Requirements and Prerequisites Next navigation step Downloading from the SAP Fiori Front-End Server End of the navigation path.

  4. You have the following options to continue:

    • Use packager commands to create a project ZIP on the SAP Cloud Platform Mobile Services cloud build service and upload the Web assets, plugins, and other application metadata. Then start the cloud build service to package the application assets with the Cordova plugins and generate signed or unsigned application binary files for iOS (.ipa) and Android (.apk).

      For more information, see the CLI Packager documentation under http://help.sap.com/smp3014sdkStart of the navigation path Mobilizing SAP Fiori Next navigation step Packaging SAP Fiori Apps Next navigation step CLI Packager for SAP Fiori Apps Next navigation step Performing a Cloud Build End of the navigation path.

    • Use the packager commands to build your iOS or Android application on your local cordova environment. This approach can be used for testing or as an alternative to building on the SAP Cloud Platform Mobile Service cloud build service.

      For more information, see the CLI Packager documentation under http://help.sap.com/smp3014sdkStart of the navigation path Mobilizing SAP Fiori Next navigation step Packaging SAP Fiori Apps Next navigation step CLI Packager for SAP Fiori Apps Next navigation step Performing a Local Cordova Build End of the navigation path.

  5. The users install the offline apps on their devices using SAP Mobile Place.

More Information

For information about implementing the SAP Fiori apps, see http://help.sap.com/fiori_implementation.

For information about integrating SAP Mobile Platform Server into the SAP Fiori system landscape, see http://help.sap.com/fiori_implementation Start of the navigation path Integration of SAP Mobile Platform into the SAP Fiori Landscape End of the navigation path. Choose your SAP NetWeaver stack version.

For information about SAP Mobile Platform Server and the SAP Mobile Platform SDK, see http://help.sap.com/mobile-platform.

For information about making and managing builds using SAP Mobile Place, see http://help.sap.com/mobilesecure Start of the navigation path Mobile Place Next navigation step User and Administrator Guides Next navigation step Mobile Secure Administration Guide End of the navigation path.

For information about downloading and installing apps from SAP Mobile Place as an end user, see http://help.sap.com/mobilesecure Start of the navigation path Mobile Place Next navigation step User and Administrator Guides Next navigation step Mobile Place User Guide End of the navigation path.